package com.glory.wxelectricitypda.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.wxelectricitypda.R;
import com.glory.wxelectricitypda.bean.LotDefectListBean;

import java.util.List;

public class DefectListDataAdapter extends BaseQuickAdapter<LotDefectListBean.DefectInfoEntity, BaseViewHolder> {


    public DefectListDataAdapter(@Nullable List<LotDefectListBean.DefectInfoEntity> data) {
        super(R.layout.item_add_defect,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, LotDefectListBean.DefectInfoEntity item) {
        helper.setIsRecyclable(false);
        helper.setText(R.id.tvLotId,item.getLOT_ID());
        helper.setText(R.id.tvDefectQTY,String.valueOf(item.getMAIN_QTY()));
        helper.setText(R.id.tvStep,String.valueOf(item.getSTEP_NAME()));
        helper.setText(R.id.tvDefectCode,String.valueOf(item.getSCRAP_CODE()));
        helper.addOnClickListener(R.id.ivDelete);
    }

}
